package com.kaluli.config;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;

import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.web.WebApplicationInitializer;
import org.springframework.web.util.Log4jConfigListener;

@Configuration
@Order(2)
public class CommonInitializer implements WebApplicationInitializer {

	@Override
	public void onStartup(ServletContext servletContext) throws ServletException {
		// TODO Auto-generated method stub
		servletContext.setInitParameter("log4jConfigLocation", "classpath:log4j.properties");  
        servletContext.addListener(Log4jConfigListener.class);
        System.out.println("loading log4j...");
	}
	

}
